<?php
include $this->Render('header.php');
?>
<link rel="stylesheet" type="text/css" href="<?php echo BASE_STYLE;?>/css/admin.css" />
<script type="text/javascript" src="<?php echo BASE_STYLE;?>/js/dyhl.linkpage.js"></script>
<script type="text/javascript" src="<?php echo BASE_STYLE;?>/js/common.js"></script>
<script type="text/javascript" src="<?php echo BASE_STYLE;?>/js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<?php echo BASE_STYLE;?>/uploadifive/jquery.uploadifive.js"></script>
<style type="text/css">
.sup-nav-box {width:100%; height:auto; overflow:hidden; margin-bottom:15px; position:fixed; top:0; left:0; background:#FFF; padding:10px;}
.sup-nav-box li {float:left; height:27px; line-height:27px; margin-right:10px;}
.btn-hui {display:inline-block; height:27px; background:#dbdbdb; border-radius:2px; padding:0 10px;}
.line-bot {border:1px solid #a8a8a8;}
.order-item-box {width:100%;height:auto;overflow:hidden;border-bottom:1px solid #a8a8a8;padding-bottom:15px;margin-bottom:15px;}
.order-item-box input[type="text"],.order-item-box select {background:none;}
.x-form-field-wrap {display:inline-block;}
.ext-strict .x-form-text {height:22px !important; color:#555;}
.ico-close {z-index:999;}
</style>
<script type="text/javascript">
	$(document).ready(function(e) {
        $(".sup-nav-box").on('click','a',function(){
			
			$(this).addClass('btn-blue').removeClass('btn-hui');
			$(this).closest('li').siblings('li').find('a').addClass('btn-hui').removeClass('btn-blue')	;
		});
		
		
    });
</script>
<div class="chaxun-box" style="height:100%; overflow-y:scroll;overflow-x:hidden;  width:885px;">
<ul class="sup-nav-box" style="display:none;">
	<li>
    	<a href="#base" class="btn-hui">基本信息</a>
    </li>
    <li>
    	<a href="#buyer" class="btn-hui">购车人信息</a>
    </li>
    <li>
    	<a href="#spouse" class="btn-hui">配偶信息</a>
    </li>
    <li>
    	<a href="#guarantor" class="btn-hui">担保人信息</a>
    </li>
    <li>
    	<a href="#car" class="btn-blue">车辆信息</a>
    </li>
</ul>
	<a name="base"></a>
    <div class="order-item-box" style="display:none;">
    	<h2>基本信息</h2>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
        	<tr>
            	<td width="50%" height="35px">客 户 编 号：<?php echo $this->order['base']['o_number'];?></td>
                <td>
                	业务来源人：<?php echo $this->order['base']['o_uname'];?>
                </td>
            </tr>
            <tr>
            	<td height="35px">签约经销商：<?php echo $this->order['base']['o_buyer_type'];?></td>
                <td>
                	经　销　商：<?php echo $this->order['base']['o_buyer'];?>
                </td>
            </tr>
        </table>
    </div>
    <a name="buyer"></a>
    <div class="order-item-box"  style="display:none;">
    	
    	<h2>购车人信息</h2>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
        	<tr>
            	<td height="35px">购车人姓名：<?php echo $this->order['base']['buyer']['ct_name'];?></td>
                <td colspan="2">
                	性别：<?php echo $this->order['base']['buyer']['ct_sex'];?>
                </td>
                <td>身份证号：<?php echo $this->order['base']['buyer']['ct_code'];?></td>
            </tr>
            <tr>
            	<td height="35px" colspan="2">
                	身份证归属地：<?php echo $this->order['base']['buyer']['ct_affiliation'];?>
                </td>
                <td colspan="2" id="huoji-areas">
                	户籍：
                    <?php echo $this->order['owner']['ot_residence_pro'];?><?php echo $this->order['owner']['ot_residence_city'];?><?php echo $this->order['owner']['ot_residence_area'];?>
                </td>
            </tr>
            
            <tr>
            	<td height="35px">
                	学历：<?php echo $this->order['owner']['ot_edu'];?>
                </td>
                <td colspan="2">
                	手机号：<?php echo $this->order['owner']['ot_mobile'];?>
                </td>
                <td>
                	婚否：<?php echo $this->order['owner']['ot_married'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="4" height="35px">
                	银行卡号：<?php echo $this->order['owner']['ot_bankcard'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	现居地：<?php echo $this->order['owner']['ot_liveadd'];?>
                </td>
                <td colspan="2">
                	固定电话：<?php echo $this->order['owner']['ot_tel'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="2" height="35px">
                	实际家庭地址：<?php echo $this->order['owner']['ot_home_add'];?>
                </td>
                <td colspan="2">
                	房产地址：<?php echo $this->order['owner']['ot_house_add'];?>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                	房产所有权人：<?php echo $this->order['owner']['ot_house_owner'];?>
                </td>
                <td colspan="2">
                	与购车人关系：<?php echo $this->order['owner']['ot_hown_relation'];?>
                </td>
            </tr>
            <tr>
            	<td height="35px">
                	房产性质：<?php echo $this->order['owner']['ot_house_nature'];?>
                </td>
                <td colspan="2">
                	房屋面积：<?php echo $this->order['owner']['ot_house_acreage'];?>平方米
                </td>
                <td>
                	目前市价：<?php echo $this->order['owner']['ot_house_price'];?>万元
                </td>
            </tr>
            <tr>
            	<td height="35px">
                	房贷金额：<?php echo $this->order['owner']['ot_house_loan'];?>万元
                </td>
                <td colspan="2">
                	年限：<?php echo $this->order['owner']['ot_house_loyear'];?>月
                </td>
                <td>
                	月还款：<?php echo $this->order['owner']['ot_house_refundmo'];?>元
                </td>
            </tr>
            <tr>
            	<td colspan="2" height="35px">
                	公司名：<?php echo $this->order['owner']['ot_company'];?>
                </td>
                <td colspan="2">
                	单位地址：<?php echo $this->order['owner']['ot_company_add'];?>
                </td>
                
            </tr>
            <tr>
            	<td height="35px">
                	单位电话：<?php echo $this->order['owner']['ot_company_tel'];?>
                </td>
                <td colspan="2">
                	单位类型：<?php echo $this->order['owner']['ot_company_type'];?>
                </td>
                <td>
                	职务类型：<?php echo $this->order['owner']['ot_duty_type'];?>
                </td>
            </tr>
            <tr>
            	<td height="35px">
                	职务：<?php echo $this->order['owner']['ot_duty'];?>
                </td>
                <td colspan="2">
                	经营期限：<?php echo $this->order['owner']['ot_operat_period'];?>
                </td>
                <td>
                	工龄：<?php echo $this->order['owner']['ot_seniority'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="2" height="35px">
                	所占股份：<?php echo $this->order['owner']['ot_stake'];?>%
                </td>
                <td colspan="2">
                	月收入：<?php echo $this->order['owner']['ot_income_month'];?>元
                </td>
            </tr>
            
            <tr>
            	<td colspan="2" height="35px">
                	紧急联系人一：<?php echo $this->order['owner']['ot_contact'][0]['name'];?>
                </td>
                <td>
                	手机号：<?php echo $this->order['owner']['ot_contact'][0]['mobile'];?>
                </td>
                <td>
                	关系：<?php echo $this->order['owner']['ot_contact'][0]['relation'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="2" height="35px">
                	紧急联系人二：<?php echo $this->order['owner']['ot_contact'][1]['name'];?>
                </td>
                <td>
                	手机号：<?php echo $this->order['owner']['ot_contact'][1]['mobile'];?>
                </td>
                <td>
                	关系：<?php echo $this->order['owner']['ot_contact'][1]['relation'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="4" valign="top">
                	备注：
                    <?php echo $this->order['owner']['ot_remark'];?>
                </td>
            </tr>
            
        </table>
    </div>
    
    <a name="spouse"></a>
    <div class="order-item-box"  style="display:none;">
    	
    	<h2>配偶信息</h2>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
        	<tr>
            	<td height="35px">配偶姓名：<?php echo $this->order['spouse']['ct_name'];?></td>
                <td colspan="2">
                	性别：<?php echo $this->order['spouse']['ct_sex'];?>
                </td>
                <td>身份证号：<?php echo $this->order['spouse']['ct_code'];?></td>
            </tr>
            <input type="hidden" value="<?php echo $this->order['spouse']['ct_id'];?>" name="ct_spouse_detail[ct_spouse_id]" />
            <tr>
            	<td height="35px" colspan="2">
                	身份证归属地：<?php echo $this->order['spouse']['ct_affiliation'];?>
                </td>
                <td colspan="2" id="spouse-areas">
                	户籍：
                    <?php echo $this->order['spouse']['ct_detail']['ct_spouse_province'];?>
                    <?php echo $this->order['spouse']['ct_detail']['ct_spouse_city'];?>
                    <?php echo $this->order['spouse']['ct_detail']['ct_spouse_area'];?>

                </td>
            </tr>

            <tr>
            	<td height="35px">
                	学历：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_degree'];?>
                </td>
                <td colspan="2">
                	手机号：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_mobile'];?>
                </td>
                <td>
                	
                </td>
            </tr>
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	现居地：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_liveadd'];?>
                </td>
                <td colspan="2">
                	固定电话：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_tel'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="2" height="35px">
                	公司名：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_company'];?>
                </td>
                <td colspan="2">
                	单位地址：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_cadd'];?>
                </td>
                
            </tr>
            <tr>
            	<td height="35px">
                	单位电话：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_ctel'];?>
                </td>
                <td colspan="2">
                	单位类型：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_ctype'];?>
                </td>
                <td>
                	职务类型：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_dutytp'];?>
                </td>
            </tr>
            <tr>
            	<td height="35px">
                	职务：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_duty'];?>
                </td>
                <td colspan="2">
                	经营期限：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_operatpd'];?>
                </td>
                <td>
                	月收入：<?php echo $this->order['spouse']['ct_detail']['ct_spouse_mincome'];?>元
                </td>
            </tr>
            <tr>
            	<td colspan="4" valign="top">
                	备注：<?php echo trim($this->order['spouse']['ct_detail']['ct_spouse_remark']);?>
                </td>
            </tr>
            
            <?php
				if(!empty($this->order['spouse']['credit']['ct_remark'])) {
			?>
            <tr>
            	<td colspan="4">
                	征信结果：<?php echo $this->order['owner']['credit']['ct_remark'];?>
                </td>
            </tr>
            <?php
				}
			?>
            
        </table>
    </div>
    <a name="guarantor"></a>
    <?php
    	if(!empty($this->order['guarantor'])) foreach($this->order['guarantor'] as $key => $val){
	?>
    <div class="order-item-box"  style="display:none;">
    	<h2>担保人信息</h2>
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
        	<tr>
            	<td height="35px">担保人姓名：<?php echo $val['ct_name'];?></td>
                <td>
                	性别：<?php echo $val['ct_sex'];?>
                </td>
                <td>身份证号：<?php echo $val['ct_code'];?></td>
            </tr>
            <input type="hidden" name="ct_guarantor_detail[<?php echo $key;?>][ct_guarantor_id]" value="<?php echo $val['ct_id'];?>" />
            <tr>
            	<td height="35px" colspan="2">
                	身份证归属地：<?php echo $val['ct_affiliation'];?>
                </td>
                <td colspan="2" class="J-ct-guarantor-<?php echo $key;?>">
                	户籍：
                    <?php echo $val['ct_detail']['ct_guarantor_province'];?>
                    <?php echo $val['ct_detail']['ct_guarantor_city'];?>
                    <?php echo $val['ct_detail']['ct_guarantor_area'];?>
                    
                </td>
            </tr>

            <tr>
            	<td height="35px">
                	学历：<?php echo $val['ct_detail']['ct_guarantor_degree'];?>
                </td>
                <td colspan="2">
                	手机号：<?php echo $val['ct_detail']['ct_guarantor_mobile'];?>
                </td>
                <td>
                	婚否：<?php echo $val['ct_detail']['ct_guarantor_married'];?>
                </td>
            </tr>
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	现居地：<?php echo $val['ct_detail']['ct_guarantor_liveadd'];?>
                </td>
                <td colspan="2">
                	固定电话：<?php echo $val['ct_detail']['ct_guarantor_tel'];?>
                </td>
            </tr>
            
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	实际家庭地址：<?php echo $val['ct_detail']['ct_guarantor_hadd'];?>
                </td>
                <td colspan="2">
                	房产地址：<?php echo $val['ct_detail']['ct_guarantor_headd'];?>
                </td>
            </tr>
            
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	房产所有权人：<?php echo $val['ct_detail']['ct_guarantor_howner'];?>
                </td>
                <td colspan="2">
                	与购车人关系：<?php echo $val['ct_detail']['ct_guarantor_hrelation'];?>
                </td>
            </tr>
            
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	房产性质：<?php echo $val['ct_detail']['ct_guarantor_hnature'];?>
                	
                </td>
                <td colspan="2">
                	房屋面积：<?php echo $val['ct_detail']['ct_guarantor_hacreage'];?>平方米
                </td>
            </tr>
            
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	目前市价：<?php echo $val['ct_detail']['ct_guarantor_hprice'];?>
                </td>
                <td colspan="2">
                	房贷金额：<?php echo $val['ct_detail']['ct_guarantor_hloan'];?>
                </td>
            </tr>
            
            <tr>
            	<td colspan="2" width="40%" height="35px">
                	年限：<?php echo $val['ct_detail']['ct_guarantor_hloan'];?>
                </td>
                <td colspan="2">
                	月还款：<?php echo $val['ct_detail']['ct_guarantor_hrefundmo'];?>
                </td>
            </tr>
            

            <tr>
            	<td colspan="2" height="35px">
                	公司名：<?php echo $val['ct_detail']['ct_guarantor_company'];?>
                </td>
                <td colspan="2">
                	单位地址：<?php echo $val['ct_detail']['ct_guarantor_cadd'];?>
                </td>
                
            </tr>
            <tr>
            	<td height="35px">
                	单位电话：<?php echo $val['ct_detail']['ct_guarantor_ctel'];?>
                </td>
                <td colspan="2">
                	单位类型：<?php echo $val['ct_detail']['ct_guarantor_ctype'];?>
                </td>
                <td>
                	职务类型：<?php echo $val['ct_detail']['ct_guarantor_dutytp'];?>
                </td>
            </tr>
            <tr>
            	<td height="35px">
                	职务：<?php echo $val['ct_detail']['ct_guarantor_duty'];?>
                </td>
                <td colspan="2">
                	经营期限：<?php echo $val['ct_detail']['ct_guarantor_operatpd'];?>
                </td>
                <td>
                	工龄：<?php echo $val['ct_detail']['ct_guarantor_seniority'];?>
                </td>
            </tr>
            
            <tr>
            	<td height="35px">
                	所占股份：<?php echo $val['ct_detail']['ct_guarantor_stake'];?>%
                </td>
                <td colspan="2">
                	月收入：<?php echo $val['ct_detail']['ct_guarantor_mincome'];?>元
                </td>
                <td></td>
            </tr>
            <tr>
            	<td colspan="4" valign="top">
                	备注：<?php echo $val['ct_detail']['ct_guarantor_remark'];?>
                </td>
            </tr>
            
        </table>
    </div>
    <?php
		}
		if(Purview::checkPurview($this->UserConfig['Id'],array('crm','supplement','info', 'replenish'))){
	?>
	<a name="car"></a>
    <form action="/supplement/info/option/save/" method="post" name="form1" class="J-ajaxForm">
    <div class="order-item-box" style="margin-top:30px; border:0;">
    	<fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
        	<legend style="padding:5px 15px;"><h2>车辆信息</h2></legend>
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td height="35" align="right">车辆类型：</td>
                    <td colspan="5"><input type="text" class="J-ot-car-model" value="<?php echo $this->order['car']['ot_car_model'];?>" name="ot_car_model" id='J-ot-car-model' style="width:193px;" />
                       <input type="text" class="J-ot-car-fullmodel" id="J-ot-car-fullmodel" value="<?php echo $this->order['car']['ot_car_fullmodel'];?>" name="ot_car_fullmodel" style="width:247px;"/>
                        &nbsp;&nbsp;

                        <span class="J-ot-car-seating"><?php if(!empty($this->order['car']['ot_car_seating'])){echo $this->order['car']['ot_car_seating'].'座';}?></span>
                        <input type="hidden" class="J-ot-car-seating-value" name="ot_car_seating" value="<?php echo $this->order['car']['ot_car_seating'];?>" />
                        <span class="J-ot-car-type"><?php echo $this->order['car']['ot_car_type'];?></span>
                        <input type="hidden" class="J-ot-car-type-value" name="ot_car_type" value="<?php echo $this->order['car']['ot_car_type'];?>" />
                        <input type="hidden" class="J-ot-car-brand-value" name="ot_car_brand" value="<?php echo $this->order['car']['ot_car_brand'];?>" /></td>
                </tr>
                <script type="text/javascript">
                                $(".J-ot-car-fullmodel").blur(function(){
                                    var car_fullmodel = document.getElementById("J-ot-car-fullmodel").value;
                                    $.post('/public/ajax/option/carmsg/',{"car_fullmodel":car_fullmodel},function(data){
                                        var obj = JSON.parse(data);
                                        if(obj['success']){
                                            $(".J-ot-car-type").html(obj['msg']['type']);
                                            $(".J-ot-car-seating").html(obj['msg']['seat_number']+'座');
                                            $(".J-ot-car-type-value").val(obj['msg']['type']);
                                            $(".J-ot-car-seating-value").val(obj['msg']['seat_number']);
                                            $(".J-ot-car-brand-value").val(obj['msg']['brand']);
                                        }   
                                });
                                });
                     </script>
                <tr>
                    <td width="80" height="35" align="right">车型构成：</td>
                    <td>
                        <input type="text" class="J-ot-car-pose" value="<?php echo $this->order['car']['ot_car_pose'];?>" name="ot_car_pose" id="<?php if($this->order['paidmoney'] !=1) echo 'J-ot-car-pose';?>" <?php if($this->order['paidmoney'] ==1) echo 'readonly';?>/>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <div class="<?php echo $this->order['car']['ot_car_pose'] == '二手车' ? '' : 'fn-hide';?> J-ot-sinocap">
                            评估价：<?php echo $this->order['car']['ot_assessment'];?>
                            <input name="ot_assessment" readonly type="hidden" value="<?php echo $this->order['car']['ot_assessment'];?>" />
                            
                            <!--待确定-->
                            <input name="ot_estimate" readonly type="hidden" value="<?php echo $this->order['car']['ot_estimate'];?>" />
                        </div>
                    </td>
                    <td width="80" height="35" align="right">是否公牌：</td>
                    <td>
                        <!--
                        <select class="J-ot-pubbrand" name="ot_pubbrand" style="width:150px;">
                            <option <?php echo $this->order['car']['ot_pubbrand'] == '是' ? 'selected' : '';?> value="是">是</option>
                            <option <?php echo $this->order['car']['ot_pubbrand'] == '否' ? 'selected' : '';?> value="否">否</option>
                        </select>
                        -->
                        <input type="text" value="<?php echo $this->order['car']['ot_pubbrand'];?>" name="ot_pubbrand" id="J-ot-pubbrand" />
                    </td>
                    <td width="80" height="35" align="right">上牌地：</td>
                    <td class="J-car-reg">
                        <select id="J-reg-province" name="ot_reg_province" style="width:80px" ></select>
                        <?php if($this->order['paidmoney'] ==1) {
                            echo '<input type="hidden" id="J-reg-province" name="ot_reg_province" value="';
                            echo $this->order['car']['ot_reg_province'];
                            echo '"/>';}?>
                        <select id="J-reg-city" class="J-ct-reg-city" name="ot_reg_city" style="width:80px"></select>
                        <?php if($this->order['paidmoney'] ==1) {
                            echo '<input type="hidden" id="J-reg-city" name="ot_reg_city" value="';
                            echo $this->order['car']['ot_reg_city'];
                            echo '"/>';}?>
                        <select id="J-reg-area" class="J-ct-reg-areas" data-chkTxt="<?php echo empty($this->order['car']['ot_reg_area']) ? '拱墅区' : $this->order['car']['ot_reg_area'];?>" name="ot_reg_area" style="width:80px"></select>
                        
                        <input class="J-hiden-reg-val" id="hiden-reg-val" type="text" style="visibility:hidden;width:0;" value="" alt="请选择完整地区信息！"><label></label>
                    </td>
                    <script type="text/javascript">
                        $(".J-car-reg").Linkage({ url:"/public/ajax/?option=city&bank_id=<?php echo $this->order['base']['o_bank_id']?>",selects:['#J-reg-province','#J-reg-city',''],selected:['<?php echo empty($this->order['car']['ot_reg_province']) ? '浙江省' : $this->order['car']['ot_reg_province'];?>','<?php echo empty($this->order['car']['ot_reg_city']) ? '杭州市' : $this->order['car']['ot_reg_city'];?>','<?php echo empty($this->order['car']['ot_reg_area']) ? '拱墅区' : $this->order['car']['ot_reg_area'];?>'],callback:function(data){
                            var text = new Array();
                            var value = new Array();
                            for(i in data[0]){
                              if(data[0][i]!=0){
                                text.push(data[1][i]);
                                value.push(data[0][i]);
                              }
                            }
                            $(".J-car-reg").find(".J-hiden-reg-val").val(value.join(','));
                            var cityVal = $(".J-ct-reg-city").val();
                            //获取区
                            $(".J-ct-reg-areas").dyhlSelect({'type':'','url':'/public/ajax/?option=area&city='+cityVal+'&bank_id=<?php echo $this->order['base']['o_bank_id']?>',"selectTxt":'city',"selectId":'city'});
                            
                            FireEvent(document.getElementById("hiden-reg-val"),"change");
                        }});
                        
                        $(".J-ct-reg-areas").dyhlSelect({'type':'','url':'/public/ajax/?option=area&city=<?php echo empty($this->order['car']['ot_reg_city']) ? '杭州市' : $this->order['car']['ot_reg_city'];?>',"selectTxt":'city',"selectId":'city'});
                    </script>
                    
                </tr>
    
                <tr>
                    <td width="80" height="35" align="right">行驶证车主：</td>
                    <td><input name="ot_car_owners" type="text" style="width:150px" value="<?php echo $this->order['car']['ot_car_owners'];?>" /></td>
                    <td width="80" height="35" align="right">贷款银行：</td>
                    <td><?php echo $this->order['base']['o_bank'];?></td>
                    <input type="hidden" id="J_ct_bank_area" value="<?php echo $this->order['base']['o_bank'];?>" name="o_bank_name" />
                    <td width="80" height="35" align="right">贷款年限：</td>
                    <td>
                        <!--<select class="J-ot-loan-year" data-chkTxt="<?php echo $this->order['car']['ot_loan_year'];?>" name="ot_loan_year" style="width:150px"></select>-->
                        <input type="text" class="J-ot-loan-year" value="<?php echo $this->order['car']['ot_loan_year'];?>" name="ot_loan_year" id="<?php if($this->order['paidmoney'] !=1) echo 'J-ot-loan-year';?>" <?php if($this->order['paidmoney'] ==1) echo 'readonly';?>/>
                    </td>
                </tr>
                <tr>
                    <td width="80" height="35" align="right">产品类型：</td>
                    <td>
                        <input type="text" name="ot_loan_type" class="J-ot-loan-type" value="<?php echo $this->order['car']['ot_loan_type'];?>" id="<?php if($this->order['paidmoney'] !=1) echo 'J-ot-loan-type';?>" <?php if($this->order['paidmoney'] ==1) echo 'readonly';?>/>
                    </td>
                    <td width="80" height="35" align="right">产品编号：</td>
                    <td>
                        <span class="J-pro-code"><?php echo $this->order['car']['ot_bankrt_code'];?></span>
                        银行利率：<span class="J-pro-bank-rate"><?php echo $this->order['car']['ot_calculated']['bank_rate'] * 100;?>%</span>
                        <input type="hidden" class="J-ot-bankrt-id" name="ot_bankrt_id" value="<?php echo $this->order['car']['ot_bankrt_id'];?>" />
                        <input type="hidden" class="J-ot-bankrt-code" name="ot_bankrt_code" value="<?php echo $this->order['car']['ot_bankrt_code'];?>" />
                    </td>
                    <td width="80" height="35" align="right">车价：</td>
                    <td>
                        <input name="ot_car_price" class="J-ot-car-price" type="text" style="width:60px" value="<?php echo $this->order['car']['ot_car_price'];?>" />&nbsp;元
                        <?php if($this->order['base']['o_bank']=='中国农业银行股份有限公司萧山分行'){?>
                        <span class="J-ot-car-html">
                            其他费用：
                            <input name="ot_car_oprice" class="J-ot-car-oprice" style="width:60px" type="text" value="<?php echo $this->order['car']['ot_car_oprice'];?>" />元
                        </span>
                    <?php }?>
                    </td>
                </tr>
                
                <tr>
                    <td width="80" height="35" align="right">贷款额：</td>
                    <td><input name="ot_loan_limit" class="J-ot-loan-limit" type="text" value="<?php echo $this->order['car']['ot_loan_limit'];?>" style=" width:120px;" <?php if($this->order['paidmoney'] ==1) echo 'readonly';?>/>&nbsp;元</td>
                    <td width="80" height="35" align="right">公司费率：</td>
                    <td>
                        <input name="ot_loan_rate" class="J-ot-loan-rate" type="text" style="width:50px;" value="<?php echo $this->order['car']['ot_loan_rate'];?>" <?php if($this->order['paidmoney'] ==1) echo 'readonly';?>/>%
                        <?php if($this->order['base']['o_bank']=='（2017）中国工商银行股份有限公司杭州延中支行'|| $this->order['base']['o_bank']=='中国工商银行股份有限公司哈尔滨东直支行'){?>
                        &nbsp;
                        服务费率:
                        <input name="ot_service_rate" type="text" class="J-ot-servcie-rate" value="<?php echo $this->order['car']['ot_service_rate'];?>" style="width: 50px;" <?php if($this->order['paidmoney'] ==1) echo 'readonly';?>/>%
                        <?php }?>
                        <input type="hidden" class="J-o-bank-id" value="<?php echo $this->order['base']['o_bank_id'];?>" name="o_bank_id" />
                        <input type="hidden" class="J-bank-rate" value="<?php echo $this->order['car']['ot_calculated']['bank_rate'];?>" name="ot_calculated[bank_rate]" />
                        
                    </td>
                    <td width="80" height="35" align="right"><a class="nc-btn-input J-loanrate" href="javascript:;" style=" position:relative; top:6px; left:25px;">计算</a></td>
                    <td></td>
                </tr>
                
                <tr>
                    <td colspan="2" height="35">
                        实际首付款（元）：
                        <span class="J-d-payment"><?php echo $this->order['car']['ot_calculated']['d_payment'];?></span>
                        <input type="hidden" class="J-d-payment-value" name="ot_calculated[d_payment]" value="<?php echo $this->order['car']['ot_calculated']['d_payment'];?>" />
                    </td>
                    <td colspan="2" height="35">
                        实际首付比例（％）：
                        <span class="J-d-payment-per"><?php echo $this->order['car']['ot_calculated']['d_payment_per'];?></span>
                        <input type="hidden" class="J-d-payment-per-value" name="ot_calculated[d_payment_per]" value="<?php echo $this->order['car']['ot_calculated']['d_payment_per'];?>" />
                    </td>
                    <td colspan="2" height="35">
                        实际贷款比例（％）：
                        <span class="J-d-loan-per"><?php echo $this->order['car']['ot_calculated']['d_loan_per'];?></span>
                        <input type="hidden" class="J-d-loan-per-value" name="ot_calculated[d_loan_per]" value="<?php echo $this->order['car']['ot_calculated']['d_loan_per'];?>" />
                    </td>
                </tr>
                
                <tr>
                    <td colspan="2" height="35">
                        分期付款总额（元）：
                        <span class="J-d-aging-money"><?php echo $this->order['car']['ot_calculated']['d_aging_money'];?></span>
                        <input type="hidden" class="J-d-aging-money-value" name="ot_calculated[d_aging_money]" value="<?php echo $this->order['car']['ot_calculated']['d_aging_money'];?>" />
                    </td>
                    <td colspan="2" height="35">
                        分期付款比例（％）：
                        <span class="J-d-aging-per"><?php echo $this->order['car']['ot_calculated']['d_aging_per'];?></span>
                        <input type="hidden" class="J-d-aging-per-value" name="ot_calculated[d_aging_per]" value="<?php echo $this->order['car']['ot_calculated']['d_aging_per'];?>" />
                    </td>
                    <td colspan="2" height="35">
                        分期手续费（元）：
                        <span class="J-d-aging-poundage"><?php echo $this->order['car']['ot_calculated']['d_aging_poundage'];?></span>
                        <input type="hidden" class="J-d-aging-poundage-value" name="ot_calculated[d_aging_poundage]" value="<?php echo $this->order['car']['ot_calculated']['d_aging_poundage'];?>" />
                    </td>
                </tr>
                
                <tr>
                    <td colspan="2" height="35">
                        申请分期付款总额（元）：
                        <span class="J-d-signag-money"><?php echo $this->order['car']['ot_calculated']['d_signag_money'];?></span>
                        <input name="ot_calculated[d_signag_money]" class="J-d-signag-money-value" type="hidden" value="<?php echo $this->order['car']['ot_calculated']['d_signag_money'];?>" />
                    </td>
                    <td colspan="2" height="35">
                        申请分期付款比例（％）：
                        <span class="J-d-aging-moneyper"><?php echo $this->order['car']['ot_calculated']['d_aging_moneyper'];?></span>
                        <input type="hidden" class="J-d-aging-moneyper-value" name="ot_calculated[d_aging_moneyper]" value="<?php echo $this->order['car']['ot_calculated']['d_aging_moneyper'];?>" />
                    </td>
                    <td colspan="2" height="35">
                        月还款额（元）：
                        <span class="J-d-refund-month"><?php echo $this->order['car']['ot_calculated']['d_refund_month'];?></span>
                        <input type="hidden" class="J-d-refund-month-value" name="ot_calculated[d_refund_month]" value="<?php echo $this->order['car']['ot_calculated']['d_refund_month'];?>" />
                    </td>
                    
                </tr>
                
                <tr>
                    <td colspan="2" height="35">
                        首期还款额（元）：
                        <span class="J-d-refund-1month"><?php echo empty($this->order['car']['ot_calculated']['d_refund_1month']) ? $this->order['car']['ot_calculated']['d_refund_month'] : $this->order['car']['ot_calculated']['d_refund_1month'];?></span>
                        <input type="hidden" class="J-d-refund-1month-value" name="ot_calculated[d_refund_1month]" value="<?php echo $this->order['car']['ot_calculated']['d_refund_1month'];?>" />
                    </td>
                    <td colspan="2" height="35">
                        <?php if($this->order['base']['o_bank']=='（2017）中国工商银行股份有限公司杭州延中支行' || $this->order['base']['o_bank']=='中国工商银行股份有限公司哈尔滨东直支行'){?>
                        金融服务费（元）：
                        <span class="J-d-service-money"><?php echo $this->order['car']['ot_calculated']['d_service_money'];?></span>
                        <input type="hidden" class="J-d-service-money-value" name="ot_calculated[d_service_money]" value="<?php echo $this->order['car']['ot_calculated']['d_service_money'];?>" />
                        <?php }?>
                    </td>
                    <td colspan="2" height="35">
                        <?php if($this->order['base']['o_bank']=='（2017）中国工商银行股份有限公司杭州延中支行' || $this->order['base']['o_bank']=='中国工商银行股份有限公司哈尔滨东直支行'){?>
                        金融服务费比例（％）：
                        <span class="J-d-service-per"><?php echo $this->order['car']['ot_calculated']['d_service_per'];?></span>
                        <input type="hidden" class="J-d-service-per-value" name="ot_calculated[d_service_per]" value="<?php echo $this->order['car']['ot_calculated']['d_service_per'];?>" />
                        <?php }?>
                    </td>
                    
                </tr>
                <?php if($this->order['base']['o_bank']=='中国工商银行股份有限公司哈尔滨东直支行' && $this->order['car']['ot_car_pose'] == '二手车'){ ?>
                <tr>
                    <td colspan="2" height="35">
                    出报告金额（元）:
                        <span class="J-d-transaction-amount"><?php echo $this->order['car']['ot_calculated']['d_transaction_amount'];?></span>
                        <input type="hidden" class="J-d-transaction-amount-value" name="ot_calculated[d_transaction_amount]" value="<?php echo $this->order['car']['ot_calculated']['d_transaction_amount'];?>" />
                    </td></tr>
                    <?php }?>
                
                <tr>
                    <td colspan="5" valign="top">
                        备注：
                        <textarea name="ot_loan_remark" style="width:450px; height:55px; background:none; resize:none; vertical-align:text-top;"><?php echo $this->order['car']['ot_loan_remark'];?></textarea>
                    </td>
                    <td>
                        <input type="hidden" value="<?php echo $this->order['car']['ot_sinocap'];?>" class="J-hidden-ot-sinocap" name="ot_sinocap" />
                        <input type="hidden" value="<?php echo $this->order['car']['ot_estimate'];?>" class="J-hidden-ot-estimate" name="ot_estimate" />
                        <input type="hidden" value="<?php echo $this->order['car']['ot_assessment'];?>" class="J-hidden-ot-assessment" name="ot_assessment" />
                        <input type="hidden" name="oid" value="<?php echo $this->order['base']['o_id'];?>" />
                        <input type="submit" class="a-btn-close mr15 J-b-submit" value="保存车辆修改" />
                    </td>
                </tr>

                <tr>
                    <td colspan="2" height="50px">
                        <p style="padding-bottom:10px;"><input type="checkbox" value="1" data-ctid="<?php echo $this->order['owner']['credit']['ct_id'];?>" <?php echo $this->order['owner']['credit']['ct_skip'] == 1 ? 'checked' : '';?> class="J-chk-zx" style="vertical-align:sub;" />&nbsp;购车人跳过二次征信</p>
                        <?php if(!empty($this->order['spouse'])){?>
                        <p style="padding-bottom:10px;"><input type="checkbox" value="1" data-ctid="<?php echo $this->order['spouse']['ct_id'];?>" <?php echo $this->order['spouse']['ct_skip'] == 1 ? 'checked' : '';?> class="J-chk-zx" style="vertical-align:sub;" />&nbsp;配偶跳过二次征信</p>
                        <?php } ?>
                        <?php
							if(!empty($this->order['guarantor'])) {
								foreach($this->order['guarantor'] as $key => $val){
						?>
                        <p style="padding-bottom:10px;"><input type="checkbox" value="1" data-ctid="<?php echo $val['ct_id'];?>" <?php echo $val['ct_skip'] == 1 ? 'checked' : '';?> class="J-chk-zx" style="vertical-align:sub;" />&nbsp;担保人- <?php echo $val['ct_name'];?> - 跳过二次征信</p>
                        <?php
								}
							}
						?>
                    </td>
                    <td colspan="5">
                        <input type="hidden" value="<?php echo $this->order['video_audit'];?>" name="video_audit" />
                        <a href="javascript:;" class="a-btn-close J-zuofei">作废订单</a>
                    </td>
                </tr>
                
            </table>
        </fieldset>
    </div>
    </form>
    <?php
		}
	?>
    <form action="/supplement/info/option/save/" method="post" name="form1" class="J-ajaxForm-bulu">
    <div class="order-item-box" style="margin-top:30px; border:0;">
    	<fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
        	<legend style="padding:5px 15px;"><h2>车辆信息补录内容</h2></legend>
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td width="100" height="35" align="right">车辆类别：</td>
                    <td><input name="ot_cartp" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_cartp'];?>" /></td>
                    <td width="100" align="right">发票开具单位：</td>
                    <td><input name="ot_invoice_com" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_invoice_com'];?>" /></td>
                    <td width="100" align="right">发票号：</td>
                    <td><input name="ot_invoice_no" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_invoice_no'];?>" /></td>
                </tr>
                <tr>
                    <td width="100" height="35" align="right">具体车型：</td>
                    <td><input name="ot_carmodels" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_carmodels'];?>" /></td>
                    <td width="100" align="right">车架号：</td>
                    <td><input name="ot_carno" class="J-ot-carno" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_carno'];?>" /></td>
                    <td width="100" align="right">底盘号后六位：</td>
                    <td><input name="ot_chassisno" class="J-ot-chassisno" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_chassisno'];?>" /></td>
                </tr>
                <tr>
                    <td width="100" height="35" align="right">发动机号：</td>
                    <td><input name="ot_engineno" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_engineno'];?>" /></td>
                    <td width="100" align="right">车辆颜色：</td>
                    <td><input name="ot_carcolor" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_carcolor'];?>" /></td>
                    <td width="100" align="right">初始登记时间：</td>
                    <td><input name="ot_initialrg_time" type="text" style=" width:150px;" onClick="WdatePicker()" value="<?php echo $this->order['car']['ot_initialrg_time'];?>" /></td>
                </tr>
                <tr>
                    <?php if($this->order['car']['ot_car_pose'] == '二手车'){ ?>
                    <td width="100" height="35" align="right">主贷人新车牌号：</td>
                    <td><input name="ot_car_platenum" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_car_platenum'];?>" /></td>
                    <?php } ?>
                    <td width="100" align="right">开票日期：</td>
                    <td><input name="ot_billing_date" type="text" style=" width:150px;" onClick="WdatePicker()" value="<?php  if($this->order['car']['ot_billing_date'] !='0000-00-00') echo $this->order['car']['ot_billing_date'];?>" /></td>
                    <?php if($this->order['car']['ot_car_pose'] == '二手车'){ ?>
                    <td width="100" height="35" align="right">机动车登记证书号:</td>
                    <td><input name="ot_car_register" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_car_register'];?>" /></td>     <?php } ?>         
                </tr>
                <tr>
                    <td colspan="6">
                        <input type="hidden" name="oid" value="<?php echo $this->order['base']['o_id'];?>" />
                        <input type="submit" class="a-btn-close mr15 J-bulu-submit" value="补录内容保存" />
                    </td>
                </tr>
            </table>
         </fieldset>
    </div>
    </form>
    <script type="text/javascript">
    	$(document).ready(function(e) {
            $('.J-ot-carno').on('keyup',function(){
				var txt = $(this).val(),
					len = txt.length;
				
				if(len > 6){
					$(".J-ot-chassisno").val(txt.substr((len - 6)));	
				}	
			});
        });
    </script>
    
    <form action="/supplement/info/option/save/" method="post" name="form1" class="J-ajaxForm-gps">
    <div class="order-item-box" style="margin-top:30px; border:0;">
    	<fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
        	<legend style="padding:5px 15px;"><h2>GPS信息</h2></legend>
    	
            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                    <td width="100" height="35" align="right">GPS安装时间：</td>
                    <td><input name="ot_gps_install" type="text" style=" width:150px;" <?php if($this->order['sign_money'] ==0) echo "onClick='WdatePicker()'";?> value="<?php echo empty($this->order['car']['ot_gps_install']) || $this->order['car']['ot_gps_install'] == '0000-00-00' ? '' : $this->order['car']['ot_gps_install'];?>" <?php if($this->order['sign_money'] ==1) echo "readonly";?>/></td>
                    <td width="100" align="right">GPS序列号：</td>
                    <td><input name="ot_gps_no" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_gps_no'];?>" <?php if($this->order['sign_money'] ==1 && $this->order['car']['ot_gps_status'] =='已上线') echo "readonly";?>/></td>
                    <td width="100" align="right">GPS状态：</td>
                    <td><input name="ot_gps_status" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_gps_status'];?>" readonly/></td>
                </tr>
                <tr>
                    <td width="100" height="35" align="right">GPS上线时间：</td>
                    <td><input name="ot_gps_otime" type="text" style=" width:150px;" value="<?php echo empty($this->order['car']['ot_gps_otime']) || $this->order['car']['ot_gps_otime'] == '0000-00-00'? '' : $this->order['car']['ot_gps_otime'];?>" readonly/></td>
                    <td width="100" align="right">GPS备注：</td>
                    <td><input name="ot_gps_remark" type="text" style=" width:150px;" value="<?php echo $this->order['car']['ot_gps_remark'];?>" /></td>
                    <td colspan="2">
                        <input type="hidden" name="oid" value="<?php echo $this->order['base']['o_id'];?>" />
                        <input type="submit" class="a-btn-close mr15 J-gps-submit" value="GPS信息保存" />
                        <input type="button" class="a-btn-close mr15 J-gps-get" value="获取状态" />
                        <input type="button" class="a-btn-close mr15 J-gps-clean" value="撤销GPS信息" />
                    </td>
                </tr>
                <?php
                    if(!empty($this->order['car']['ot_gps_no'])) {
                        $gps_no_length = strlen($this->order['car']['ot_gps_no']);
                        $gps_no_start = substr($this->order['car']['ot_gps_no'],0,3);
                        $gps_company = '未知平台';
                        if($gps_no_length==11 && ($gps_no_start=='391' || $gps_no_start=='802')) $gps_company = '<a href="http://www.cdguanjia.com/login.html" target="_blank">车贷管家</a>';
                        if($gps_no_length==15 && $gps_no_start=='868') $gps_company = '<a href="http://www.tuqiangol.com" target="_blank">途强在线</a>';
                        if(($gps_no_length==15 && $gps_no_start=='180') || ($gps_no_start=='863') ||($gps_no_start=='141')) $gps_company = '<a href="http://www.hdvps.cn" target="_blank">昊德科技</a>';
                        if(($gps_no_start=='863') ||($gps_no_start=='141')) $gps_company = '<a href="http://fk.gpsonline.cn" target="_blank">北斗在线</a>';
                        if($gps_no_start=='353') $gps_company = '<a href="http://www.jlmgps.com/Skins/JlmGps/?locale=cn&back=true">金立铭</a>';
                        if($gps_no_start=='145') $gps_company = '<a href="http://www.exlive.cn/home/kaifangpt/main.jsp?type=4" target="_blank">茗鸿</a>';
                ?>
                <tr>
                    <td colspan="6">
                        设备平台：<?php echo $gps_company;?>
                    </td>
                </tr>
                <?php } ?>
            </table>
         </fieldset>
    </div>
    </form>
    <script type="text/javascript">
        $(".J-gps-clean").on('click',function(){
            var sta = confirm('您确定要清除GPS信息吗?');
            if (sta == true) {
                $.post('/supplement/index/option/gpsclean/', {'oid': $(".J-ajaxForm-gps").find("input[name='oid']").val()}, function (data) {
                    if (data.success) {
                        Ext.Msg.alert('提示', data['msg'], function () {
                            location.reload();
                        });
                    } else {
                        Ext.Msg.alert('提示', data['msg']);
                    }
                }, 'json');
            }
        });

    </script>

    <?php if($this->order['car']['ot_car_pose'] == '二手车'){ ?>

    <form action="/supplement/info/option/save/?type=etcar" method="post" name="form1" class="J-ajaxForm-etcar">
        <style type="text/css">
            .uploadifive-button {width:84px;height:84px !important;line-height:normal;margin-top:-84px;background:none !important;}

            .file-upload-completed,.uploadifive-queue-item {position:absolute;width:84px;bottom:0;}

            .uploadifive-queue-item .close {background: url('<?php echo BASE_STYLE;?>/uploadifive/uploadifive-cancel.png') 0 0 no-repeat;display: block;float: right;height: 16px;
                text-indent: -9999px;width: 16px;}
            .uploadifive-queue-item .progress {height: 3px;margin-top: 5px;width: 100%;}
            .uploadifive-queue-item .progress-bar {background-color: #0072BC;height: 3px;width: 0;}

            .uploadifive-queue-item .filename {display:none;}
            input[type="text"],select {background:none;}
        </style>
        <div class="order-item-box" style="margin-top:30px; border:0;">
            <fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
                <legend style="padding:5px 15px;"><h2>上传登记证书(最多八张)</h2></legend>

                    <dl class="mianqianxinxi-box">
                        <dd class="mianqianxinxi-pic-list J-box-order-sign" id="J-box-order-sign">

                            <?php if(!empty($this->order['car']['attachment']['car_image'])) foreach($this->order['car']['attachment']['car_image'] as $k=>$v){?>
                                <div style="position:relative;display:inline-block; float:left;margin-right:10px;">
                                    <?php if(empty($this->order['car']['ot_2check_user'])){ ?>
                                    <em class="ico-close J-ico-close"></em>
                                    <?php } ?>
                                        <img data-original="<?php echo $this->order['car']['attachment']['car_image_url'][$k];?>" class="example-image" src="<?php echo $this->order['car']['attachment']['car_image_thurl'][$k];?>" width="80" height="80" />
                                        <input type="hidden" value="<?php echo $v;?>" name="car_image[]" />
                                    </a>
                                </div>
                                <?php
                            }
                            ?>

                        </dd>
                        <?php if(empty($this->order['car']['ot_2check_user'])){ ?>
                        <dd>
                            <div class="file-upload-box J-file-upload-box fn-left mr10">
                                <div class="file-upload-completed" id="J_car_img"></div>
                                <img src="<?php echo BASE_STYLE;?>/images/btn_upload_pic.png" />
                                <input type="file" id="upload_car_img" name="upload-pic" size="30" hidefocus="true" multiple='false' accept="image/*"/>
                            </div>
                        </dd>
                    </dl>
                <input type="hidden" name="oid" value="<?php echo $this->order['base']['o_id'];?>" />
                <input type="submit" class="a-btn-close mr15 J-car-submit" value="保存">

                <?php
                if(Purview::checkPurview($this->UserConfig['Id'],array('crm','supplement','info', 'carsure'))){
                    ?>

                <input type="button" class="a-btn-close mr15 J-car_sure" value="评估确认" />


                <?php } }else{ ?>
                    </dl>
                    <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td style="text-align: right" width="70%" height="20px">确认人：</td>
                            <td width="10%">
                                <?php echo $this->order['car']['ot_2check_user'];?>
                            <td style="text-align: right" width="10%">确认时间：</td>
                            <td width="10%">
                                <?php echo $this->order['car']['ot_2check_date'];?>
                            </td>
                            <td width="10%">&nbsp </td><td width="11%">&nbsp</td>
                        </tr>
                    </table>
                <?php } ?>
            </fieldset>
        </div>
    </form>

    <?php } ?>
    <fieldset style="border:1px solid #a8a8a8; padding:10px 15px;">
        <legend style="padding:5px 15px;"><h2>车资照片与提车影像</h2></legend>
        <dt style="font-weight:bold;">车资照片</dt>
        <form action="/supplement/info/option/save/?type=carfare" method="post" name="form1" class="J-ajaxForm-carfare">
        <style type="text/css">
            .uploadifive-button {width:84px;height:84px !important;line-height:normal;margin-top:-84px;background:none !important;}

            .file-upload-completed,.uploadifive-queue-item {position:absolute;width:84px;bottom:0;}

            .uploadifive-queue-item .close {background: url('<?php echo BASE_STYLE;?>/uploadifive/uploadifive-cancel.png') 0 0 no-repeat;display: block;float: right;height: 16px;
                text-indent: -9999px;width: 16px;}
            .uploadifive-queue-item .progress {height: 3px;margin-top: 5px;width: 100%;}
            .uploadifive-queue-item .progress-bar {background-color: #0072BC;height: 3px;width: 0;}

            .uploadifive-queue-item .filename {display:none;}
            input[type="text"],select {background:none;}
        </style>
        <div class="order-item-box" style="margin-top:30px; border:0;">
                    <dl class="chezixinxi-box">
                        <dd class="chezixinxi-pic-list J-box-order-sign2" id="J-box-order-sign2">

                            <?php if(!empty($this->order['car']['carfare_img']['carfare_image'])) foreach($this->order['car']['carfare_img']['carfare_image'] as $k=>$v){?>
                                <div style="position:relative;display:inline-block; float:left;margin-right:10px;">
                                    <?php if($this->order['car']['ot_image_status'] =='未提交' || ($this->order['car']['ot_image_status'] =='退回' && empty($this->order['oldinfo']['o_cprice_date']))){ ?>
                                    <em class="ico-close J-ico-close"></em>
                                    <?php }?>
                                        <img data-original="<?php echo $this->order['car']['carfare_img']['carfare_image_url'][$k];?>" class="example-image" src="<?php echo $this->order['car']['carfare_img']['carfare_image_thurl'][$k];?>" width="80" height="80" />
                                        <input type="hidden" value="<?php echo $v;?>" name="carfare_image[]" />
                                    </a>
                                </div>
                                <?php
                            }
                            ?>

                        </dd>
                        <?php if($this->order['car']['ot_image_status'] =='未提交' || ($this->order['car']['ot_image_status'] =='退回' && empty($this->order['oldinfo']['o_cprice_date']))){ ?>
                        <dd>
                            <div class="file-upload-box J-file-upload-box fn-left mr10">
                                <div class="file-upload-completed" id="J_carfare_img"></div>
                                <img src="<?php echo BASE_STYLE;?>/images/btn_upload_pic.png" />
                                <input type="file" id="upload_carfare_img" name="upload-pic" size="30" hidefocus="true" multiple='false' accept="image/*"/></div>
                        </dd>
                        <?php }?>
                    </dl>
                <?php if($this->order['car']['ot_image_status'] =='未提交' || ($this->order['car']['ot_image_status'] =='退回' && empty($this->order['oldinfo']['o_cprice_date']))){ ?>
                <input type="hidden" name="oid" value="<?php echo $this->order['base']['o_id'];?>" />
                <input type="submit" class="a-btn-close mr15 J-carfare-submit" value="保存">
                <?php }elseif(!empty($this->order['car']['carfare_img']['carfare_image']) && !empty($this->order['oldinfo']['o_cprice_date'])){ ?>
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td>车资确认时间：<?php echo substr($this->order['oldinfo']['o_cprice_date'],0,4).'-'.substr($this->order['oldinfo']['o_cprice_date'],4,2).'-'.substr($this->order['oldinfo']['o_cprice_date'],6,2);?></td>
                        </tr>
                    </table>
                    <?php }?>
        </div>
    </form>

                <dt style="font-weight:bold;">提车影像(最多八张)</dt>
<form action="/supplement/info/option/save/?type=getcar" method="post" name="form1" class="J-ajaxForm-getcar">
        <style type="text/css">
            .uploadifive-button {width:84px;height:84px !important;line-height:normal;margin-top:-84px;background:none !important;}

            .file-upload-completed,.uploadifive-queue-item {position:absolute;width:84px;bottom:0;}

            .uploadifive-queue-item .close {background: url('<?php echo BASE_STYLE;?>/uploadifive/uploadifive-cancel.png') 0 0 no-repeat;display: block;float: right;height: 16px;
                text-indent: -9999px;width: 16px;}
            .uploadifive-queue-item .progress {height: 3px;margin-top: 5px;width: 100%;}
            .uploadifive-queue-item .progress-bar {background-color: #0072BC;height: 3px;width: 0;}

            .uploadifive-queue-item .filename {display:none;}
            input[type="text"],select {background:none;}
        </style>
        <div class="order-item-box" style="margin-top:30px; border:0;">

                    <dl class="mianqianxinxi-box">
                        <dd class="mianqianxinxi-pic-list J-box-order-sign3" id="J-box-order-sign3">

                            <?php if(!empty($this->order['car']['getcar_img']['getcar_image'])) foreach($this->order['car']['getcar_img']['getcar_image'] as $k=>$v){?>
                                <div style="position:relative;display:inline-block; float:left;margin-right:10px;">
                                    <?php if($this->order['car']['ot_image_status'] =='未提交' || ($this->order['car']['ot_image_status'] =='退回' && empty($this->order['oldinfo']['o_getcar_date']))){ ?>
                                    <em class="ico-close J-ico-close"></em>
                                    <?php }?>
                                        <img data-original="<?php echo $this->order['car']['getcar_img']['getcar_image_url'][$k];?>" class="example-image" src="<?php echo $this->order['car']['getcar_img']['getcar_image_thurl'][$k];?>" width="80" height="80" />
                                        <input type="hidden" value="<?php echo $v;?>" name="getcar_image[]" />
                                    </a>
                                </div>
                                <?php
                            }
                            ?>

                        </dd>
                        <?php if($this->order['car']['ot_image_status'] =='未提交' || ($this->order['car']['ot_image_status'] =='退回' && empty($this->order['oldinfo']['o_getcar_date']))){ ?>
                        <dd>
                            <div class="file-upload-box J-file-upload-box fn-left mr10">
                                <div class="file-upload-completed" id="J_getcar_img"></div>
                                <img src="<?php echo BASE_STYLE;?>/images/btn_upload_pic.png" />
                                <input type="file" id="upload_getcar_img" name="upload-pic" size="30" hidefocus="true" multiple='false' accept="image/*"/>
                            </div>
                        </dd>
                        <?php }?>
                    </dl>
                <?php if($this->order['car']['ot_image_status'] =='未提交' || ($this->order['car']['ot_image_status'] =='退回' && empty($this->order['oldinfo']['o_getcar_date']))){ ?>
                <input type="hidden" name="oid" value="<?php echo $this->order['base']['o_id'];?>" />
                <input type="submit" class="a-btn-close mr15 J-getcar-submit" value="保存">
                <?php }elseif(!empty($this->order['car']['getcar_img']['getcar_image']) && !empty($this->order['oldinfo']['o_getcar_date'])){ ?>
                        <table width="100%" cellpadding="0" cellspacing="0" border="0">
                        <tr>
                            <td >提车影像确认时间：
                                <?php echo substr($this->order['oldinfo']['o_getcar_date'],0,4).'-'.substr($this->order['oldinfo']['o_getcar_date'],4,2).'-'.substr($this->order['oldinfo']['o_getcar_date'],6,2);?>
                            </td>
                        </tr>
                    </table>
                    <?php }?>
        </div>
    </form>
        <?php if($this->order['car']['ot_image_status'] =='未提交' || $this->order['car']['ot_image_status'] =='退回'){?>
        <input type="button" class="a-btn-close mr15 fn-right J-img-submit" value="确认提交到车资" />
    <?php } if($this->order['car']['ot_image_status'] == '退回' || $this->order['car']['ot_image_status'] == '通过'){ ?>
        <table>
            <tr>
                <td style="text-align: right" width="100%" height="20px">备注:<?php echo $this->order['oldinfo']['o_cprice_remark'];?></td></tr>
        </table>
        <?php }?>
        <?php if($this->order['car']['ot_image_status'] !='未提交' && $this->order['car']['ot_image_status'] !='') {?>
        <table>
            <tr>
                <td>状态：<?php echo $this->order['car']['ot_image_status'];?></td>
            </tr>
            <tr>
                <td>提交时间：<?php echo date('Y-m-d H:i:s',$this->order['car']['ot_image_date']);?>
            </tr>
            <tr>
                <td>提交人:<?php echo $this->order['car']['ot_image_user'];?></td></tr>
        </table>

        <?php }else{ echo '状态:未提交';}?>
</fieldset>
    <script type="text/javascript">
if(document.getElementById('J-box-order-sign')){
    var viewerSign = new Viewer(document.getElementById('J-box-order-sign'),{
        url:"data-original",
        show:function(){
            viewerSign.update();     
        }   
    });
}
if(document.getElementById('J-box-order-sign2')){
    var viewerSign2 = new Viewer(document.getElementById('J-box-order-sign2'),{
        url:"data-original",
        show:function(){
            viewerSign2.update();   
        }   
    });
}
if(document.getElementById('J-box-order-sign3')){
    var viewerSign3 = new Viewer(document.getElementById('J-box-order-sign3'),{
        url:"data-original",
        show:function(){
            viewerSign3.update();    
        }   
    });
}
        <?php $timestamp = time();?>
        var names = {'car_img':'.J-box-order-sign','carfare_img':'.J-box-order-sign2','getcar_img':'.J-box-order-sign3'};
        function render_upload() {
            var key;
            var limit;
            for (key in names) {
                var url="/order/upfile/option/upimage/";
                var fileTypeTxt = 'image/*';
                if(key == 'car_img'){
                    limit = 5;
                }else if(key == 'carfare_img'){
                    limit = 10;
                }else{
                    limit = 5;
                }
                $('#upload_' + key).uploadifive({
                    'auto': true,
                    'width': 84,
                    'buttonText': '',
                    'removeTimeout':1,
                    'fileObjName':'upload-pic',
                    'formData': {
                        'timestamp': '<?php echo $timestamp;?>',
                        'tb':key,
                        'filebox':'upload-pic',
                        'token': '<?php echo md5('unique_salt' . $timestamp);?>',
                        'oid' : '<?php echo $this->order['base']['o_id'];?>'
                    },
                    'number': key,
                    'queueClass':names[key],
                    'uploadScript': url,
                    'removeCompleted' : true,
                    'uploadLimit'     : limit,
                    'fileType'  : fileTypeTxt,
                    'onSelect' : function(q, opt){
                        //$('#'+opt.formData.key + opt.number).find('a').remove();
                    },
                    'onUploadComplete': function (file, data, opt) {
                        var obj = $.parseJSON(data);

                        if (data == 0) {
                            alert('您上传的文件不是允许的图片文件！');
                            return;
                        };

                        if(obj['success']){

                            var html='';
                            html+='<div style="position:relative;display:inline-block; float:left;margin-right:10px;">';
                            html+='	<em class="ico-close J-ico-close"></em>';
                        
                            switch(opt.number){
                                case 'car_img':
                                    html+='	<img class="example-image" src="'+obj['msg']['thumb_path']+'" width="80" height="80" />';
                                    html+='	<input type="hidden" value="'+obj['msg']['ai_path']+'" name="car_image[]" />';
                                    break;
                                case 'carfare_img':
                                    html+=' <img class="example-image" src="'+obj['msg']['thumb_path']+'" width="80" height="80" />';
                                    html+=' <input type="hidden" value="'+obj['msg']['ai_path']+'" name="carfare_image[]" />';
                                    break;
                                case'getcar_img':
                                    html+=' <img class="example-image" src="'+obj['msg']['thumb_path']+'" width="80" height="80" />';
                                    html+=' <input type="hidden" value="'+obj['msg']['ai_path']+'" name="getcar_image[]" />';
                                    break;
                                }
                            
                            html+='</div>';

                            $(opt.queueClass).append(html);
                        }else{
                            Ext.Msg.alert('提示',obj['msg']);
                            return false;
                        }

                    }
                });
            }
        };
        $(document).ready(function(e) {
            render_upload();
            //删除上传的图片
            $(".order-item-box").on('click','.J-ico-close',function(){
                $(this).closest('div').remove();
            });
    $(".J-b-submit").on('click',function(){
        var dizhi = window.location.href;
        var dizhis =dizhi.split("=");
        var id = dizhis[1];
        var sta = confirm('您确定要提交吗?')
        if(sta == true){
            $(this).dyhlForm({
                beforefunction: function (){
                    $(".J-b-submit").prop('disabled',true);
                    Ext.getBody().mask("数据提交中，请稍等"); 
                },
                nofunction:function(){
                    $(".J-b-submit").prop('disabled',false);
                    Ext.getBody().unmask();
                },
                sucessfunction:function(data){
                    $(".J-b-submit").prop('disabled',false);
                    Ext.getBody().unmask();
                    if(data['msg'] == '信息保存成功'){
                        Ext.Msg.confirm('提示','保存成功,是否再次垫款?',function(btn){
                        if(btn =='yes'){
                        $.post('/supplement/info/option/pay_again/',{'oid':id});
                        Ext.Msg.alert('提示','再次垫款成功');
                        }else{
                            return false;
                        }
                        });
                    }else{
                        Ext.Msg.alert(data['msg']);
                    }
                }   
            }); 
        }else{
            return false;   
        }
    });
            //默认加载
            //getAttachmentList(true);
        });
    </script>


</div>

<style type="text/css">
	.mianqianxinxi-box {
        height: 85px;
		overflow:hidden;
		margin-top:15px;
	}

	.mianqianxinxi-box dt {
		margin-bottom:10px;
	}
	.mianqianxinxi-box dd {
		float:left;
	}
	
	.mianqianxinxi-pic-list {
		margin-right:10px;
	}
	
	.mianqianxinxi-pic-list img {
		margin-right:10px;
	}

    .chezixinxi-box {
        overflow:hidden;
        margin-top:15px;
    }

    .chezixinxi-box dt {
        margin-bottom:10px;
    }
    .chezixinxi-box dd {
        float:left;
    }
    
    .chezixinxi-pic-list {
        margin-right:10px;
    }
    
    .chezixinxi-pic-list img {
        margin-right:10px;
    }


</style>

<script type="text/javascript" src="<?php echo BASE_STYLE;?>/js/dyhl_ext.js"></script>
<script type="text/javascript" src="<?php echo BASE_STYLE;?>/js/supplement_info.js?v=<?php echo time();?>"></script>
<?php include $this->Render('footer.php'); die();?>